package com.cosmos.codegen.base.db;


import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * mysql
 * 
 * @date 2016-3-22 10:02:24
 * @version 1.0
 * @author zhuzhaoyong
 *
 */
public class MySQLDB extends AbstractDB {

	static {
		try {
			Class.forName("com.mysql.jdbc.Driver");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}

	@Override
	public Connection getConnection() {
		try {
			return (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
		} catch (SQLException e) {
			e.printStackTrace();
			return null;
		}
	}

}
